#include <workflow/WFFacilities.h>
#include <workflow/WFTaskFactory.h>
#include <workflow/HttpUtil.h>
#include <signal.h>
#include <iostream>
using std::cout;
using std::cerr;
static WFFacilities::WaitGroup waitGroup(1);
void sighandler(int signum){
    waitGroup.done();
}
int main(){
    signal(SIGINT,sighandler);
    // 创建任务
    WFRedisTask * redisTask = WFTaskFactory::create_redis_task("redis://127.0.0.1:6379",10,nullptr);
    // 找到请求 设置一下要执行的指令
    protocol::RedisRequest *req = redisTask->get_req();
    req->set_request("SET",{"61test","world"});
    // 启动任务 把任务交给框架
    redisTask->start();
    waitGroup.wait();
    return 0;
}